<template>
    <div>
        <h1>添加</h1>
        <input type="text" v-model="value">
        <button @click="addaction">添加</button>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                value:''
            }
        },
        methods: {
            addaction(){
                this.$emit("add",this.value)
                this.value=""
            }
        },
    }
</script>

<style lang="scss" scoped>

</style>